<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="statementIndex" />
<script type="text/javascript">
	$(document).ready(
			function() {
				$('#btnSelect').click(
						function() {
							window.open(
									'${contextPath}/statement/stm/selfrun/getSelfrun?'
											+ $('#selfrunForm').serialize(),
									'_self');
						});
			});
</script>

</head>
<body>
	<form id="selfrunForm"
		action="${contextPath}/statement/stm/selfrun/list"
		modelAttribute="stmSelfrun" method="post" class="form-inline"
		role="form">

		<div class="form-group show col-sm-6">
			<label for="inputEmail3" class="col-sm-4 control-label">是否对账：</label>
			<div class="col-sm-8">
				<ossp:radio dictType="sales" id="isReconciliation"
					name="isReconciliation"></ossp:radio>
			</div>
		</div>

		<div class="o-l-action from-inline">
			<div class="form-group">
				<input name="supplierNo" value="${stmSelfrun.supplierNo }"
					class="form-control" placeholder="供应商编号">
			</div>
			<div class="form-group">
				<input name="startTime"
					value="<fmt:formatDate value="${stmSelfrun.startTime }" pattern="yyyy-MM-dd"/>"
					class="form-control" placeholder="结算开始时间">
			</div>
			<div class="form-group">
				<input name="endTime"
					value="<fmt:formatDate value="${stmSelfrun.endTime }" pattern="yyyy-MM-dd"/>"
					class="form-control" placeholder="结算结束时间">
			</div>


			<button type="button" id="btnSelect" role="button"
				class="btn btn-primary pull-right">查询</button>
			<div class="btn-group">
				<button type="button"
					class="btn btn-primary dropdown-toggle pull-right"
					data-toggle="dropdown">
					结算项查询 <span class="caret"></span>
				</button>
				<ul class="dropdown-menu" role="menu">
					<li><a
						href="${contextPath}/biz/statement/statementSaleDetail/list?billNo=${statementSaleNote.billNo}"
						data-target="_self">销售查询</a></li>
					<li><a href="#">自营单据查询</a></li>
					<li><a href="#">合同查询</a></li>


				</ul>
			</div>
		</div>
	</form>
	<tags:message content="${message}" />
	<table class="table table-striped table-hover o-l-table" id="table1">
		<thead>
			<tr>
				<th style="width: 1px"><input type="checkbox" data-ckb="all"></th>
				<th>是否对账</th>
				<th>结算单号</th>
				<th>结算起始时间</th>
				<th>结算结束时间</th>
				<th>供应商名称</th>
				<th>本期销售额</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${list}" var="stmSelfrun">
				<tr
					data-herf="${contextPath}/statement/stm/selfrun/${stmSelfrun.billNo}/getBillNo"
					data-target="_self">
					<td class="o-l-tab-ckb"><input type="checkbox"
						data-ckb-id="${stmSelfrun.id}"></td>
					<td><c:if test="${stmSelfrun.isReconciliation==1}">未对账</c:if>
						<c:if test="${stmSelfrun.isReconciliation==2}">已对账</c:if></td>
					<td>${stmSelfrun.billNo}</td>
					<td><fmt:formatDate value="${stmSelfrun.startTime}"
							pattern="yyyy-MM-dd " /></td>
					<td><fmt:formatDate value="${stmSelfrun.endTime}"
							pattern="yyyy-MM-dd " /></td>
					<td>${stmSelfrun.supplierName}</td>
					<td>${stmSelfrun.sales}</td>

				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="o-l-page">
		<div class="col-sm-6">
			<ul class="pagination">
				<li class="disabled"><a href="javascript:">&#171; 上一页</a></li>
				<li class="disabled"><a href="#">1</a></li>
				<li class="disabled"><a href="#">下一页 &#187;</a></li>
			</ul>
		</div>
		<div class="col-sm-6">
			<span class="pull-right"> 到第<input
				class="form-control input-sm input-goto" type="text">页
				<button class="btn btn-sm btn-primary" role="button">go</button>
			</span>
		</div>
	</div>
	<script type="text/javascript" src="${staticPath}/js/list.js"></script>
</body>
</html>